#! /bin/sh

set -e

# Stop SMS service.
if [ -e /etc/init.d/sms ]; then
  invoke-rc.d sms stop
fi

# Backup database.
if [ -e /var/sms/db ]; then
  rm -rf /var/sms/db.backup
  cp -R /var/sms/db /var/sms/db.backup
fi

